"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  props: ["activeIndex"],
  data() {
    return {
      isFirstClick: true,
      tabBarList: [
        {
          iconPath: "/static/tab-bar/index.png",
          selectedIconPath: "/static/tab-bar/index_selected.png",
          pagePath: "/pages/index/index",
          text: "首页"
        },
        {
          iconPath: "/static/tab-bar/consult_selected.png",
          selectedIconPath: "/static/tab-bar/consult.png",
          // pagePath: "/pages/TUIKit/TUIPages/TUIConversation/create",
          pagePath: "/pages/consult/consult"
        },
        {
          iconPath: "/static/tab-bar/my.png",
          selectedIconPath: "/static/tab-bar/my_selected.png",
          pagePath: "/pages/my/my",
          text: "我的"
        }
      ]
    };
  },
  watch: {
    visible: function(d) {
    }
  },
  methods: {
    switchClick(data, index) {
      if (index == this.activeIndex) {
        this.isFirstClick = false;
        if (this.activeIndex == 0) {
          console.log("点击");
          common_vendor.index.reLaunch({
            url: "/pages/index/index"
          });
        }
        return;
      }
      common_vendor.index.switchTab({
        url: data.pagePath
      });
    }
  }
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return {
    a: $props.activeIndex == 0 ? $data.tabBarList[0].selectedIconPath : $data.tabBarList[0].iconPath,
    b: common_vendor.n($props.activeIndex == 0 ? "active" : ""),
    c: common_vendor.o(($event) => $options.switchClick($data.tabBarList[0], 0)),
    d: $props.activeIndex == 1 ? $data.tabBarList[1].selectedIconPath : $data.tabBarList[1].iconPath,
    e: common_vendor.o(($event) => $options.switchClick($data.tabBarList[1], 1)),
    f: $props.activeIndex == 2 ? $data.tabBarList[2].selectedIconPath : $data.tabBarList[2].iconPath,
    g: common_vendor.n($props.activeIndex == 2 ? "active" : ""),
    h: common_vendor.o(($event) => $options.switchClick($data.tabBarList[2], 2))
  };
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ffb3232c"], ["__file", "D:/Project/heart-3.0/heart-field-3.0/components/tab-bar/tab-bar.vue"]]);
wx.createComponent(Component);
